<template>
    <div class="slide">
        <div class="s-item" v-for="(item,index) in slideList" :key="index" @click="navTo(item)">
            <div class="s-item-img"><img :src="item.imgUrl"/></div>
            <p class="s-item-title">{{item.title}}</p>
        </div>
    </div>
</template>
<script>
export default {
    name:'slide',
    props:{
        slideList:Array
    },
    methods:{
        navTo(item){
            console.log(item)
        }
    }
}
</script>
<style lang='less' scoped>
    img{
        width: 100%;
        height: 100%;
    }
    .slide{
        padding: .16rem 0 .31rem .23rem;
        display: flex;
        // width: 100%;
        overflow: auto;
        .s-item{
            width: 1.2rem;
            height: 1.6rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            margin-right: .41rem;
            .s-item-img{
                width:1.2rem;
                height: 1.2rem;
            }
            .s-item-title{
                color:#4E4E4E;
                font-size: .24rem;
            }
        }
    }
</style>